using System;
using System.Collections.Generic;
using System.Text;

namespace Pegasus.ServiceModel
{
	/// <summary>
	/// Event Args for broadcast and private messages events.
	/// </summary>
	public class EventArgsMessage : EventArgs
	{
		// Local Instance Values
		private string m_sender;
		private object m_message;

		/// <summary>
		/// Initializes a new instance of the <see cref="EventArgsMessage"/> class.
		/// </summary>
		/// <param name="sender">The name of the node that sent the message.</param>
		/// <param name="message">The message.</param>
		internal EventArgsMessage( string sender, object message )
		{
			m_sender = sender;
			m_message = message;
		}

		/// <summary>
		/// Gets the name of the node that sent the message.
		/// </summary>
		/// <value>The name of the node that sent the message.</value>
		public string Name
		{
			get
			{
				return m_sender;
			}
		}

		/// <summary>
		/// Gets the message.
		/// </summary>
		/// <value>The message.</value>
		public object Message
		{
			get
			{
				return m_message;
			}
		}
	}
}
